1 The Universal Sensor Sketch

Introduction

These documents contain the documentation for the Universal Sensor code. There are LoRa sensors in different types and sizes. Apart from the sensor itself they differ mostly in power usage and local storage capacity. There are sensor in the following types:

All three categories are described in their sections below. But apart from these technologies, it is more important to chose the application of the Sensor first: Where do we want to use it for? After all, if we let end-users take that decision they want it all. However, in most cases that is too expensive and not necessary. So for Lora sensor you need to determine the minimum requirements necessary to provide the required service and then build the sensor based on these requirements. Valid questions are:

It is important to recognize that Lora is used best in applications where there is a significant distance between sensor and gateway, low bandwidth is required and low power is available. If we for example need sensors in and around our home (only) with lots of WiFi present and a lot of mains voltage available then blue-tooth might be a better option. And if money is available and long distances need to be covered then satellite communication might be more effective, 

So in short, Lora has its place for mid distance communication, low bandwidth and low power. Therefore, in the remainder of the document, we assume that Lora communication has been chosen for good reasons and we focus on the way to get the communication going as good and cheap as possible.

Sensors based on Arduino

This is the oldest form of Lora Sensors that I used. For Arduino most sensors were already available, so the focus was on finding a Lora stack that worked in the available amount of memory and did not consume too much power.

Sensors based on ESP

Sensors based on ESP8266 or ESP32 should have a big battery, have a long time between Lora messages or be connected to 230V (Europe) main voltage.

Sensors based on Cube-Cell

In October 2019 Heltec started with the Cube-Cell sensor initiative. For this they did not only offer an Arduino IDE interface with development board but also delivered a "capsule" device with internal antenna, interface for a battery and solar cells. It could work for several months on a battery and would have more memory available for sensor development.

Apart from the development board or Capsule selection in the IDE the code for both devices is the same, therefore we will describe them together.

Not Used Technology

Of course there are more mcu's available to build Lora sensors with. Some even have far better specs than the Arduino. However, power usage of the Arduino is minimal and LoRa sensors do not need much coding and/or power so the Arduino was used for sensors for a long time.

Please look on conrad or Aliexpress to find more mcu's supported.

 

Sections

The following sections are provided in this document:

  1. Introduction (this document)
  2. Installation
  3. Configuration
  4. User Manual Arduino
  5. User Manual ESP
  6. User Manual Cube-Cell
  7. Photobook